<template>
  <div class="loader"></div>
</template>

<script setup lang="ts"></script>

<style lang="less" scoped>
  .loader {
    --height-of-loader: 6px;
    --loader-color: #1677ff;

    position: relative;
    display: block;
    height: var(--height-of-loader);
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 30px;
  }

  .loader::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--loader-color);
    border-radius: 30px;
    content: '';
    animation: moving 1s ease-in-out infinite;
  }
  @keyframes moving {
    50% {
      width: 100%;
    }

    100% {
      right: 0;
      left: unset;
      width: 0;
    }
  }
</style>
